package com.shicijiaoliu.mapper;

import com.shicijiaoliu.pojo.Replypost;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface Replypostmapper {

    int getcount( long aId, long mId);

    List<Replypost> findBypage( long aId, long mId);



    @Delete("delete from replypost where r_id=#{rId}")
    void delByid(long rId);

    @Select("select * from replypost where r_id=#{rId}")
    Replypost findByid(long rId);

    @Update("update replypost set isjing=#{isjing} where r_id=#{rId}")
    void jiajing(long rId, String isjing);

    @Select("select * from replypost")
    List<Replypost> getlist();

    @Select("select * from replypost where m_id=#{mid}")
    List<Replypost> findBymid(long mid);

    @Insert("insert into replypost (content, time, a_id, m_id,clicks, isjing) " +
            " value (#{content},#{time},#{aId},#{mId},#{clicks},#{isjing})")
    void add(Replypost rpost);
}
